﻿Ext.define('I2R.view.administration', {
    extend: 'Ext.Panel',
    alias: 'widget.i2radministration',
    border: false,
    layout: 'border',
    bodyCls: 'padd-up',
    initComponent: function () {

        var me = this;

        me.items = [
                {
                    id: 'administration-tree',
                    xtype: 'treepanel',
                    region: 'west',
                    title: 'System configuration',
                    width: 200,
                    rootVisible: false,
                    store: Ext.create('Ext.data.TreeStore', {
                        root: {
                            expanded: true,
                            children: [
                            { text: 'Configuration', leaf: true, id: 'main-configs', iconCls: 'icon_cog' },
                            { text: 'Users', leaf: true, id: 'configusers', iconCls: 'icon_group' },
                            { text: 'Departments', leaf: true, id: 'configdepartments', iconCls: 'icon_building' },
                            { text: 'News', leaf: true, id: 'confignews', iconCls: 'icon_newspaper' }
                        ]
                        }
                    })
                },
            {
                id: 'administration-tabpanel',
                region: 'center',
                xtype: 'tabpanel',
                margins: '0 0 0 4',
                items: [
                    { xtype: 'panel', title: 'Configuration'}
                ]
            }
        ];

        me.callParent(arguments);
    }
});